package com.xxg.renrencommon.domain.filedenum;

/**
 * redis key 枚举
 *
 * @author xxg
 * @date 2021/6/18
 */
public enum RedisKeyEnum {
    /**
     *
     */
    CARRY_PRODUCT_VERIFY("carry:product:verify:%s:%s", "carry:product:verify:userId:shopId", 300),
    UPLOAD_PRODUCT_KEY("upload:product:key:%s", "upload:product:key:batchId", 180),
    SET_COMMISSION_KEY("set:commission:key:%s", "set:commission:key:groupId", 5),
    ;

    /**
     * redis键
     */
    private final String key;

    /**
     * 名称
     */
    private final String name;

    /**
     * 过期时间
     */
    private final long time;

    private RedisKeyEnum(String key, String name, long time) {
        this.key = key;
        this.name = name;
        this.time = time;
    }

    public String key() {
        return key;
    }

    public String keyName() {
        return name;
    }

    public long time() {
        return time;
    }
}
